package sumit;

import java.util.Scanner;


public class SimpleCalculator 
{
	public static void main(String[] args) 
	
	{
		Scanner sc = new Scanner(System.in);
		
		
		System.out.println("*********Simple Calculator*********");
		System.out.println("");
		System.out.println("For addition press 1");
		System.out.println("For subtraction press 2");
		System.out.println("For multiplication press 3");
		System.out.println("For division press 4");
		
		
		int choice =sc.nextInt();
		
		
		System.out.println("Enter the first number");
		int a =sc.nextInt();
		
		System.out.println("Enter the second no number");
		int b =sc.nextInt();
		double output;
		
		
		{
		switch(choice)
		{
		case 1: 
			output=a+b;
			System.out.println("the addition is: " +output);
		break;
		case 2: 
			output=a-b;
			System.out.println("the subtraction is: " +output);
		break;
		case 3: 
			output=a*b;
			System.out.println("the multiplication is: " +output);
		break;
		case 4: if (b==0)
		{
			System.out.println("division not possible");
		}
		else
		{
			output=a/b;
			System.out.println("the division is: "  +output);
		}
		break;
		
		default: System.out.println("sorry ur input is wrong");
			
		}
		}
	}

}
